package examples.java;

import com.alibaba.dubbo.common.utils.ClassHelper;

import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;

/**
 * @author Bill
 * @version 2013-05-28
 */
public class ClassPathFileEnumTest {

    public static void main(String[] args) throws IOException {
        ClassLoader cl = ClassPathFileEnumTest.class.getClassLoader();
        Enumeration<URL> urls = cl.getResources("log4j.properties");

        System.out.println("have elements? " + urls.hasMoreElements());

        while (urls.hasMoreElements()) {
            URL u = urls.nextElement();
            System.out.println(u.getPath());
        }
    }

}
